package com.stone.starter.core.constant;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * Monster核心常量
 *
 * @author Mr_wenpan@163.com 2021/07/15 10:21
 */
public interface StoneCoreConstants {

    interface ErrorCode {
        String BATCH_OPERATION = "error.batch_operation";
    }

    interface BooleanFlag {
        int ENABLE = 1;
        int NOT_ENABLE = 0;
        int ACTIVE = 1;
        int NOT_ACTIVE = 0;
        String YES = "Y";
        String NO = "N";
    }

    interface CharsetType {
        Charset US_ASCII = StandardCharsets.US_ASCII;
        Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
        Charset UTF_8 = Charset.forName("UTF-8");
        Charset UTF_16BE = Charset.forName("UTF-16BE");
        Charset UTF_16LE = Charset.forName("UTF-16LE");
        Charset UTF_16 = Charset.forName("UTF-16");
    }

    interface EntityDomain {
        String FIELD_CREATION_DATE = "creationDate";
        String FIELD_CREATED_BY = "createdBy";
        String FIELD_LAST_UPDATE_DATE = "lastUpdateDate";
        String FIELD_LAST_UPDATED_BY = "lastUpdatedBy";
        String FIELD_OBJECT_VERSION_NUMBER = "objectVersionNumber";
        String FIELD_TABLE_ID = "tableId";
    }

    /**
     * 区间类型
     */
    interface RangeType {
        /**
         * 开区间，如 ()
         */
        int BLANK = 0;

        /**
         * 半开半闭区间，如 (]
         */
        int SEMI_CLOSED = 1;

        /**
         * 闭合区间，如 []
         */
        int CLOSED = 2;
    }

}
